/**
 * 
 */
package com.yst.metho.web.application.pointage;

import nextapp.echo2.app.Border;
import nextapp.echo2.app.Color;
import nextapp.echo2.app.Column;
import nextapp.echo2.app.Extent;
import nextapp.echo2.app.Table;
import nextapp.echo2.app.table.TableCellRenderer;

import com.yst.metho.web.application.components.table.TableHeaderCellRenderer;

/**
 * @author perso
 * 
 */
public class MyActivityPane extends Column
{
	/** style utilise pour afficher la table */
	private static final String CALENDAR_VIEW_TABLE_STYLE = "Calendar.Table";

	private MyActivityModel mModel;

	public MyActivityPane(MyActivityModel model, TableCellRenderer cellRenderer)
	{
		super();
		mModel = model;
		Table table = new Table(mModel);
		table.setRolloverEnabled(false);
		table.setSelectionEnabled(false);
		table.setStyleName(CALENDAR_VIEW_TABLE_STYLE);
		table.setBorder(new Border(1, Color.LIGHTGRAY, Border.STYLE_SOLID));
		table.setWidth(new Extent(100, Extent.PERCENT));
		// mise en place du renderer de la table.
		table.setDefaultRenderer(Object.class, cellRenderer);
		// mise en place du renderer des entetes de table.
		table.setDefaultHeaderRenderer(new TableHeaderCellRenderer());
		add(table);
	}

	/**
	 * @return the model
	 */
	public MyActivityModel getModel()
	{
		return mModel;
	}
}
